<!DOCTYPE html>
<html th:replace="~{layout :: layout(~{::title}, ~{::section})}">
<head>
<title>用户编辑</title>

</head>
<body>
<section>
	<form th:action="@{/admin/user/edit}" method="post" th:object="${userinfo}">
		<input type="hidden" name="id" th:value="${userinfo?.id}">
		<div class="row">
			<div class="col-xs-2"
				 style="height: 35px; display: flex; justify-content: flex-end; line-height: 35px">
				用户名称</div>
			<div class="col-xs-6">
				<input class="form-control" type="text" placeholder="请输入用户账号"
					   name="userName" th:value="${userinfo?.userName}">
			</div>
			<div class="col-xs-4" th:if="${#fields.hasErrors('userName')}" th:errors="*{userName}" th:style="'color:red'"></div>
		</div>
		<div class="row">
			<div class="col-xs-2"
				 style="height: 35px; display: flex; justify-content: flex-end; line-height: 35px">
				用户类型</div>
			<div class="col-xs-6">
				<select class="form-control" name="userType" th:value="${userinfo?.userType}">
					<option  th:selected="${userinfo.userType eq '会员'}" value="会员">会员</option>
					<option  th:selected="${userinfo.userType eq '学生'}" value="学生">学生</option>
					<option  th:selected="${userinfo.userType eq '教师'}" value="教师">教师</option>
					<option  th:selected="${userinfo.userType eq '教辅'}" value="教辅">教辅</option>
				</select>
			</div>
			<div class="col-xs-4"></div>
		</div>

		<div class="row">
			<div class="col-xs-2"
				 style="height: 35px; display: flex; justify-content: flex-end; line-height: 35px">
			</div>
			<div class="col-xs-6">
				<button class="btn btn-primary btn-block" type="submit">保存</button>
			</div>
			<div class="col-xs-4"></div>
		</div>

	</form>

</section>

</body>
</html>